package com.nl.controller.common.exception;

import com.nl.controller.common.global.GlobalEnum;

public class SmsException extends RuntimeException {

    private Integer code;

    public SmsException(GlobalEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public SmsException(String retMsg) {
        super(retMsg);
        this.code = -99;
    }

    public SmsException() {
        super(GlobalEnum.UNKOWN_ERROR.getMsg());
        this.code = GlobalEnum.UNKOWN_ERROR.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
